﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/SiteNew.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<ASPNETMVCApplication.ActionServiceReference.Order>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	CustGetOrderList
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<script>
    $(function () {
        $("button, input:submit,input:text,.details").button();

    });
	</script>

	<table border="0" width="100%" cellpadding="0" cellspacing="0" id="content-table">
	<tr>
		<th rowspan="3" class="sized"><img src="/Assets/Images/shared/side_shadowleft.jpg" width="20" height="300" alt="" /></th>
		<th class="topleft"></th>
		<td id="tbl-border-top">&nbsp;</td>
		<th class="topright"></th>
		<th rowspan="3" class="sized"><img src="/Assets/Images/shared/side_shadowright.jpg" width="20" height="300" alt="" /></th>
	</tr>
	<tr>
		<td id="tbl-border-left"></td>
		<td>
		<!--  start content-table-inner ...................................................................... START -->
		<div id="content-table-inner">
		
			<!--  start table-content  -->
			<div id="table-content">
			
				                <style type="text/css">
                    #orderTable
                    {
                        border:1px solid #0073EA;
                        }
                    #orderTable th
                    {
                        height:50px;
                        text-align:center;
                        vertical-align:middle;
                        }
                        #orderTable td
                    {
                        text-align:center;
                        vertical-align:middle;
                        padding:10px;
                        }
                </style>
                <table id="orderTable"  border="1px solid #0073EA" cellpadding="1" cellspacing="1"   width="100%">
		           <tr class="ui-state-hover">
					<th  valign="top" style="text-align: center;"><a href="">Số xe</a>	</th>
					<th  valign="top" style="text-align: center;"><a href="">Ngày chạy</a></th>
					<th  valign="top" style="text-align: center;"><a href="">Nơi đi</a> </th>
					<th  valign="top" style="text-align: center;"><a href="">Nơi đến</a></th>
					<th  valign="top" style="text-align: center;"><a href="">Giờ chạy</a></th>
					<th  valign="top" style="text-align: center;"><a href="">Số ghế đặt</a></th>
					<th  valign="top" style="text-align: center;"><a href="">Số ghế đã mua</a></th>
					<th  valign="top" style="text-align: center;"><a href="#" >Trạng thái</a> </th>
				  </tr>
                  <%
                      int i = 0;
                      foreach (var item in Model)
                     {
                         if (i % 2 == 0)
                         {
                         
                         %>
                         <tr>
					        <td><%: item.OrderDate %></td>
					        <td>Ghế :<% foreach (var proc in item.OrderDetails)
                             {
                            %>
                                <%: proc.ProductName %>-
                            <%
                             }
                         %></td>
					        <td><%: item.RequiredDate %></td>
					        <td>Bồng sơn</td>
					        <td>17h30</td>
					        <td>6-5-7</td>
					        <td><a href="">6-4</a></td>
					        <td><% if (item.Status == 0)
                            {
                                 %>
                                 <a class="details">Chưa thanh toán</a>
                                <%
                                    }
                                 else
                                 {
                                     %>
                                     <a class="details">Đã thanh toán</a>
                                     <% 
                                 }
                        
                            %></td>
				          </tr>
                         <% 
                          }
                         else
                         {
                          %>
                          <tr class="alternate-row">
				          <td><%: item.OrderDate %></td>
					        <td>Ghế :<% foreach (var proc in item.OrderDetails)
                             {
                            %>
                                <%: proc.ProductName %>-
                            <%
                             }
                         %></td>
					        <td><%: item.RequiredDate %></td>
					        <td>Bồng sơn</td>
					        <td>17h30</td>
					        <td>6-5-7</td>
					        <td><a href="">6-4</a></td>
					        <td><% if (item.Status == 0)
                            {
                                 %>
                                 <img src="/Assets/Images/table/no.gif" height="30" width="100" />
                                <%
                                    }
                                 else
                                 {
                                     %>
                                     <img src="/Assets/Images/table/yes.png" height="30" width="100" />
                                     <% 
                                 }
                        
                            %></td>
				          </tr>
				

                          <%    
                         }       
                     }
                          %>
				
				
			</table>
			<!--  end paging................ -->
			
			<div class="clear"></div>
		 
		</div>
		<!--  end content-table-inner ............................................END  -->
		</td>
		<td id="tbl-border-right"></td>
	</tr>
	<tr>
		<th class="sized bottomleft"></th>
		<td id="tbl-border-bottom">&nbsp;</td>
		<th class="sized bottomright"></th>
	</tr>
	</table>

 


</asp:Content>

